<?php
$this->breadcrumbs = array(
    'News and Events'
);
$newsList = $data['data'];
$maxPage = $data['MaxPage'];
?>
<div class="">
    <h1>News and Events</h1>
    <!-- begin job list -->
    <div id="news-list">
        <?php foreach ($newsList as $row) { ?>
            <div class="news-box">
                <div class="panel panel-info">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b><?= $row['NewsTitle'] ?></b></h3>
                    </div>
                    <table class="table">
                        <tr><td>
                                <p class="datearticle">
                                    <?= $row['CreateDate'] ?>
                                </p>
                                <p>
                                    <?= GM::SubstringTH($row['NewsInfo'], 0, 500) ?>
                                </p>
                                <p class="text-right">
                                    <a href="index.php?lang=<?= $lang ?>&r=News/Detail&id=<?= $row['NewsID'] ?>" class="btn">
                                        <i class="icon-list-alt"></i> Detail
                                    </a>
                                </p>
                            </td></tr>
                    </table>
                </div>

            </div>
            <hr>
        <?php } ?>
    </div>
    <!-- End of job list -->
    <!--PAGE-->
    <?php
    $url = "index.php?lang=en&r=Jobs/List&";
    GM::paging($url, $page, $maxPage);
    ?>  				 
    <!--End Contact form -->											 
</div>
<script>
    $(function(){
        $('td').each(function(){
            if($(this).text()==''){
                $(this).text('-');
            }
        });
    });
</script>